package de.szut.sudoku.gui.menu;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

import de.szut.sudoku.gui.MainFrame;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Misc sub menu that contains various misc options
 * 
 * @author dqi12huisinga
 * 
 */
@SuppressWarnings("serial")
public class MiscSubMenu extends JMenu {
	public MiscSubMenu() {
		// Registers the Misc sub menu as translatable component
		MainFrame.getInstance().getlContainer()
				.addTranslatableComponent("gui.menu.MiscSubMenu", this);

		JMenuItem mntmInfo = new JMenuItem();
		// Opens an InformationFrame when clicked
		mntmInfo.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				new InformationFrame();

			}
		});

		// Registers the information button as translatable component
		MainFrame
				.getInstance()
				.getlContainer()
				.addTranslatableComponent("gui.menu.MiscSubMenu.info", mntmInfo);
		add(mntmInfo);
	}
}
